import axios from 'axios';

const API_BASE_URL = '/api/administrator'; // Proxy path

export const fetchTeacherList = async (params) => {
    try {
        const response = await axios.get(`${API_BASE_URL}/teacherpage`, { params });
        return response.data;
    } catch (error) {
        throw new Error('Error fetching teacher list');
    }
};

export const updateTeacherClazz = async (data) => {
    try {
        const response = await axios.put(`${API_BASE_URL}/teacherclazz`, data);
        return response.data;
    } catch (error) {
        throw new Error('Error updating teacher class');
    }
};
